import request from "../config/axios";
// 列表数据和搜索
export const categoryListTree = (data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dict/list?_t=1665022420&column=createTime&order=desc&field=id,,,dictName,dictCode,description,action&pageNo=${data.pageNo}&pageSize=${data.pageSize}&dictName=${data.dictName}&dictCode=${data.dictCode}`,
        // url:`http://localhost:8080/jeecg-boot/sys/dict/list?pageNo=${data.pageNo}&pageSize=${data.pageSize}&dictName=${data.dictName}dictName=${data.dictName}`,//请求的地址,
        //   url ://localhost:8080/jeecg-boot/sys/dict/list?_t=1665022667&column=createTime&order=desc&field=id,,,dictName,dictCode,description,action&pageNo=2&pageSize=10
        method:"GET",
    
    }
);
// 添加
export const addition = (data)=>request(
    {
     url:`http://localhost:8080/jeecg-boot/sys/dict/add`,
     method:"post",
     data
    }
)
//编辑
export const compile=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dict/edit`,
        method:"PUT",
        data
    }
)
// 导出
export const derive =(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dict/exportXls?_t=1665104272&column=createTime&order=desc&field=id,,,dictName,dictCode,description,action&pageNo=1&pageSize=10`,
        method:"GET",
       responseType: 'blob'
    }
)
// 删除
export const deletes =(id)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dict/delete?id=${id}`,
        method:"DELETE",
    }
)
// 回收站数据
export const recycleB =()=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dict/deleteList?_t=1665399338`,
        method:"GET"
    }
)
// 字典取回
export const  dictionaryBack=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dict/back/${data.id}`,
        method:'PUT',
        data
    }
)
//回收站数据彻底删除
export const completely=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dict/deletePhysic/${data.id}`,
        method:'DELETE'
    }
)
// 字典配置数据列表
export const dicitemList=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dictItem/list?&pageNo=${data.pageNo}&pageSize=${data.pageSize}&itemText=${data.itemText}&dictId=${data.dictId}&status=${data.status}`,
        methodL:"GET",
    }
)
// 字典配置新增
export const newlyIncreased=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dictItem/add`,
        method:'POST',
        data
    }
)
// 字典配置编辑
export const  Editor=(data)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dictItem/edit`,
        method:'PUT',
        data
    }
)
//
// 字典配置删除
export const  Expurgate=(id)=>request(
    {
        url:`http://localhost:8080/jeecg-boot/sys/dictItem/delete?id=${id}`,
        method:'DELETE',
    }
)